var path = require('path')

function resolve (dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  css: {
    loaderOptions: {
      css: {},
      postcss: {
        plugins: [
          require('postcss-px2rem')({
            remUnit: 80
          })
        ]
      }
    }
  },
  transpileDependencies: [/node_modules[/\\\\]vuetify[/\\\\]/],
  // 修改的配置
  publicPath: process.env.NODE_ENV === 'production' ? '../' : '/',
  devServer: {
    port: '8080',
    open: true,
    // proxy: {
    //   '/': {
    //     target: 'http://124.71.146.255:8083',
    //     changeOrigin: true,
    //     ws: false,
    //   }
    // }
  },
  lintOnSave: false,
  configureWebpack: config => {
    config.resolve = {
      extensions: ['.js', '.vue', '.json', '.scss'],
      alias: {
        'vue$': 'vue/dist/vue.esm.js',
        '@': resolve('src')
      }
    }
  },
  filenameHashing: false,
  productionSourceMap: false
}
